package com.treeroot.orderservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

/**
 * @Description:
 * @Author:treeRoot
 * @Email:553503639@qq.com
 * @Date: Create in 15:01 / 2022/4/28
 */
@SpringBootApplication
@EnableCircuitBreaker //在SpringCloud中使用断路器  添加熔断支持
@EnableHystrixDashboard //启用Hystrix仪表板
@EnableDiscoveryClient   //nacos注册
@EnableFeignClients  //服务的注册,开启远程调用功能，
@ComponentScan(basePackages = {"com.treeroot"})
@MapperScan("com.treeroot.orderservice.order.mapper")
public class OrderApplication {
    public static void main(String[] args)
    {
        SpringApplication.run(OrderApplication.class,args);
    }
}
